<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.a{
				width: 100px;
				height: 50px;
				background: black;
			}
			button{
				width: 50px;
				height: 20px;
			}
		</style>
	</head>
	<body>
		<button onclick="change1()">变宽</button>
		<button onclick="change2()">变宽</button>
		<button onclick="change3()">变宽</button>
		
		<div id="oDiv" class="a"></div>
		
		<script>
			function change1(){
				oDiv.style.width = '200px';
			}
			function change2()){
				oDiv.style.width = '300px';
			}
			function change3(){
				oDiv.style.width = '400px';
			}
		</script>
	</body>
</html>